const express = require("express");
const router = express.Router();

const MySql = require("../lib/mysql");

router.post("/userProject",async(req,res,next) => {



    const userId = req.body.id;
    const id = req.body.user_id;
    const start = req.body.start_time;
    const end = req.body.end_time;
    const proExp = req.body.project_exp;
    const title = req.body.title;
    
    const resInsert = await MySql.query('insert project_exp(id,user_id,start_time,end_time,project_exp,title) values(?,?,?,?,?,?)',[id,userId,start,end,proExp,title])
    res.json({
        id:resInsert.insertId,
        code:1,
        message:'project保存成功',
    })
    
   

});

module.exports = router;